package com.wzq.controller;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.wzq.service.UserService;
import com.wzq.util.AbstractApiController;

@Controller
@RequestMapping("/main")
public class MainController extends AbstractApiController{
	protected final Logger logger = LogManager.getLogger(MainController.class);
	
	@Autowired
	UserService userService;
	
	@RequestMapping("index")
	@ResponseBody
	public String index(String name){
	
		System.out.println(name);
		logger.info("测试测试测试log");
		
//		List<User> users = userService.allUser();
//		for(User user:users){
//			System.out.println(user.getUserName());
//			System.out.println(user.getPassword());
//		}
		
		return "index";
	}
	
}
